//
//  NBPlatformConfig.h
//  NBPlatformExample
//
//  Created by Sean on 15/6/13.
//  Copyright (c) 2015年 FeiYu. All rights reserved.
//

#import <Foundation/Foundation.h>


#define fyIsPad  ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)

#define fyIsLessIos8 ([[[UIDevice currentDevice] systemVersion] floatValue] < 8.0)

#define fyIsLandscape ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeLeft || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationLandscapeRight)

#define fyIsPortrait ([UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortrait || [UIApplication sharedApplication].statusBarOrientation == UIInterfaceOrientationPortraitUpsideDown)

#define fyCGRectSetOrigin(x, y, r) CGRectMake(x, y, r.size.width, r.size.height)

#define fyBundle(name) [NSString stringWithFormat:@"%@%@", @"NBResources.bundle/", name]

#define fyWithoutNil(str) (str == nil ? @"" : str)

#define fyColorGary [FYUtils fyColorWithHexString:@"424242" alpha:1.0]
#define fyColorLightGary [FYUtils fyColorWithHexString:@"DCDCDC" alpha:1.0]

#define fyLabSize1 (fyIsPad ? 15 : 10)
#define fyLabSize2 (fyIsPad ? 18 : 13)
#define fyLabSize3 (fyIsPad ? 21 : 16)
#define fyLabSize4 (fyIsPad ? 24 : 19)
#define fyLabSize5 (fyIsPad ? 27 : 22)

@interface FYMacro : NSObject

@end
